<template>
  <div>
    <h1>新闻展示</h1>
    <table>
      <tr>
        <td>新闻头条</td>
        <td>内容</td>
        <td>操作</td>
      </tr>
      <tr v-for="i in nlist">
        <td>{{i.name}}</td>
        <td>{{i.content}}</td>
        <td>
        <button @click="get_login">查看</button>
        </td>
      </tr>
    </table>


  </div>

</template>


<script>
export default {
  name: "get_news",
  data() {
    return {
      nlist:[],
    }
  },
  methods: {
    get_new(){
      this.$axios.get('users/NewsM/').then(res=>{
        console.log(res.data)
        this.nlist = res.data.list
      })
    },
    get_login(){

    },
  },
  mounted() {
    this.get_new()
  }
}
</script>

<style scoped>

</style>
